package com.itheima.redbaby;


import com.itheima.redbaby.activity.AccountCenterActivity;
import com.itheima.redbaby.activity.BrandActivity;
import com.itheima.redbaby.activity.CartActivity;
import com.itheima.redbaby.activity.CartEmptyActivity;
import com.itheima.redbaby.activity.CartModifyActivity;
import com.itheima.redbaby.activity.CuXiaoProductListActivity;
import com.itheima.redbaby.activity.HomeActivity;
import com.itheima.redbaby.activity.LimitBuyActivity;
import  com.itheima.redbaby.activity.DiZhiGuanLiActivity;
import com.itheima.redbaby.activity.OrderActivity;
import com.itheima.redbaby.activity.ProductDetailActivity;
import com.itheima.redbaby.activity.PromBulletinActivity;
import com.itheima.redbaby.activity.WelcomeActivity;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.itheima.redbaby.activity.AccountCenterActivity;
import com.itheima.redbaby.activity.CartActivity;
import com.itheima.redbaby.activity.CategoryActivity;
import com.itheima.redbaby.activity.LoginActivity;
import com.itheima.redbaby.activity.OrderActivity;
import com.itheima.redbaby.activity.PromBulletinActivity;
/*import com.itheima.redbaby.activity.SearchListview;*/
import com.itheima.redbaby.activity.SummaryPaymentActivity;
import com.itheima.redbaby.activity.WelcomeActivity;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.activity_main);
		
	}


	
	public void mhw(View v)
	{
		Intent intent=new Intent(this,DiZhiGuanLiActivity.class);
		startActivity(intent);
	}
	public void cxj(View v)
	{
		/*Intent intent=new Intent(this,SearchListview.class);
		startActivity(intent);*/
	}
	public void lzl(View v)
	{
		Intent intent=new Intent(this,SummaryPaymentActivity.class);
		startActivity(intent);//界面跳转	
	}
	public void hhl(View v)
	{
		GloableParams.isProductCatergery=true;
		Intent intent=new Intent(MainActivity.this,CartActivity.class);
		//Intent intent=new Intent(MainActivity.this,CartModifyActivity.class);
		//Intent intent=new Intent(MainActivity.this,CartEmptyActivity.class);
		
		intent.putExtra("product_id", 28);
		intent.putExtra("num", 1);
		
		startActivity(intent);
	}
	public void mxd(View v)
	{
		boolean isLogin = GloableParams.isLogin;
		if(isLogin){
			Intent intent = new Intent(MainActivity.this, AccountCenterActivity.class);
			startActivity(intent);
		}else{
			Intent intent = new Intent(MainActivity.this, LoginActivity.class);
			startActivity(intent);
		}
	}
	public void wl(View v)
	{
//		Intent intent = new Intent(this, ProductDetailActivity.class);
//		intent.putExtra("pId", 28);
//		startActivity(intent);
		Intent intent = new Intent(this, CategoryActivity.class);
		startActivity(intent);
	}
	public void lx(View v)
	{
		Intent intent  = new Intent(MainActivity.this, HomeActivity.class);
		startActivity(intent);
		
	}
	public void ykd(View v)
	{
		Intent intent  = new Intent(MainActivity.this, WelcomeActivity.class);
		startActivity(intent);
	}

}
